import request from '../util/request';

// 获取成员列表
export const getMemberApi = (data) => {
  return request({
    url: `${process.env.PUBLIC_URL}/member/getMember`,
    method: 'post',
    data,
  });
};

// 新增成员
export const addMemberApi = (data) => {
  return request({
    url: `${process.env.PUBLIC_URL}/member/addMember`,
    method: 'post',
    data,
  });
};

// 更新成员
export const updateMemberApi = (data) => {
  return request({
    url: `${process.env.PUBLIC_URL}/member/updateMember`,
    method: 'post',
    data,
  });
};

// 删除成员
export const deleteMemberApi = (data) => {
  return request({
    url: `${process.env.PUBLIC_URL}/member/deleteMember`,
    method: 'post',
    data,
  });
};

// 获取成员详情
export const getMemberByIdApi = (id) => {
  return request({
    url: `${process.env.PUBLIC_URL}/member/getMemberById/${id}`,
    method: 'get',
  });
};